From: robertl Date: Sun, 20 Dec 2009 20:21:24 +0000 (+0000) Subject: Turn on Bushnell in default build. Add tests. X-Git-Tag: archive/raspbian/1.10.0+ds-2+rpi1~1^2~199^2~94 X-Git-Url: https://dgit.raspbian.org/%22http://www.example.com/cgi/%22/%22http:/www.example.com/cgi/%22?a=commitdiff_plain;h=c1bb4e7c462a4675955195ba90fd44bb751bdf8d;p=gpsbabel.git Turn on Bushnell in default build. Add tests. --- diff --git a/bushnell.c b/bushnell.c index ab943dd15..0b7a0403f 100644 --- a/bushnell.c +++ b/bushnell.c @@ -188,7 +188,7 @@ bushnell_read(void) { icon = gbfgetc(file_in); wpt_tmp->icon_descr = bushnell_get_name_from_symbol(icon); unknown = gbfgetc(file_in); - wpt_tmp->latitude = lat_tmp / 10000000.0; + wpt_tmp->latitude = lat_tmp / 10000000.0; wpt_tmp->longitude = lon_tmp / 10000000.0; // Apparently this is always zero terminated, though it's never been diff --git a/naviguide.c b/naviguide.c index 82c530a98..bdcb701ca 100755 --- a/naviguide.c +++ b/naviguide.c @@ -70,7 +70,6 @@ typedef struct { /* Global variables */ static gbfile *file_in, *file_out; -static short_handle mkshort_handle; static gbuint16 nof_wp; static route_head *rte_head; static ng_file_header_t ng_file_header; @@ -314,7 +313,6 @@ rd_init(const char *fname) { file_in = gbfopen_le(fname, "rb", MYNAME); - mkshort_handle = mkshort_new_handle(); ng_read_file_header(); if (NULL != process) { @@ -330,7 +328,6 @@ rd_deinit(void) { gbfclose(file_in); file_in = NULL; - mkshort_del_handle(&mkshort_handle); } diff --git a/testo b/testo index 8e3471c88..a1e014f2c 100755 --- a/testo +++ b/testo @@ -30,6 +30,8 @@ bincompare() ${OD} $2 >${TMPDIR}/bc2 ${DIFF} ${TMPDIR}/bc1 ${TMPDIR}/bc2 || { echo ERROR binary comparing $* +cat ${TMPDIR}/bc1 +cat ${TMPDIR}/bc2 exit 1 } } diff --git a/testo.d/bushnell.test b/testo.d/bushnell.test new file mode 100644 index 000000000..3b5ae7a62 --- /dev/null +++ b/testo.d/bushnell.test @@ -0,0 +1,11 @@ +rm -f ${TMPDIR}/bushnell.* +gpsbabel -i bushnell -f ${REFERENCE}/bushnell.wpt -o gpx -F ${TMPDIR}/bushnell.gpx +compare ${REFERENCE}/bushnell.gpx ${TMPDIR}/bushnell.gpx + +# This format has a goofy output naming convention; each wpt must be in a +# unique file, so the output name is a template. +gpsbabel -i bushnell -f ${REFERENCE}/bushnell.wpt -o bushnell -F ${TMPDIR}/bushnell +# bincompare ${REFERENCE}/bushnell.wpt ${TMPDIR}/bushnell-0.wpt + +gpsbabel -i bushnell_trl -f ${REFERENCE}/bushnell_trl.trl -o gpx -F ${TMPDIR}/bushnell_trl.gpx +compare ${REFERENCE}/bushnell_trl.gpx ${TMPDIR}/bushnell_trl.gpx diff --git a/vecs.c b/vecs.c index 2be6dce4d..03cc09e95 100644 --- a/vecs.c +++ b/vecs.c @@ -914,7 +914,6 @@ vecs_t vec_list[] = { "Memory-Map Navigator overlay files (.mmo)", "mmo" }, -#if PLANE || 1 { &bushnell_vecs, "bushnell", @@ -927,7 +926,6 @@ vecs_t vec_list[] = { "Bushnell GPS Trail file", "trl" }, -#endif { &skyforce_vecs, "skyforce",